import Router from 'koa-router'

const router = Router()

router.post('/login', async (ctx, next) => {
    let username = ctx.request.body.username
    let password = ctx.request.body.password
    if (username === 'admin' && password === '123456') {
        ctx.body = {message: '登录成功'}
    } else {
        ctx.body = {message: '登录失败'}
    }
})

export default router
